package com.optitronics.ui;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;

import com.optitronics.beans.ResellerOrder;
import com.optitronics.util.OptitronicsConstants;

public class ResellerOrderDisplayForm {

	private Integer id;

	private String orderDate;

	private BigDecimal totalAmountWithoutTax;

	private BigDecimal totalAmountWithTax;

	private String resellerName;

	private String resellerTaxNumber;

	private String orderNumber;

	public ResellerOrderDisplayForm() {

	}

	public ResellerOrderDisplayForm(ResellerOrder resellerOrder) {
		this.id = resellerOrder.getId();
		this.totalAmountWithoutTax = resellerOrder.getTotalAmountWithoutTax();
		this.totalAmountWithTax = resellerOrder.getTotalAmountWithTax();
		this.resellerName = resellerOrder.getReseller().getName();
		this.resellerTaxNumber = resellerOrder.getReseller().getTaxNumber();
		this.orderNumber = resellerOrder.getOrderNumber();

		SimpleDateFormat dateFormat = new SimpleDateFormat(OptitronicsConstants.DATE_FORMAT);
		this.orderDate = dateFormat.format(resellerOrder.getOrderDate());
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getOrderDate() {
		return orderDate;
	}

	public void setOrderDate(String orderDate) {
		this.orderDate = orderDate;
	}

	public BigDecimal getTotalAmountWithoutTax() {
		return totalAmountWithoutTax;
	}

	public void setTotalAmountWithoutTax(BigDecimal totalAmountWithoutTax) {
		this.totalAmountWithoutTax = totalAmountWithoutTax;
	}

	public BigDecimal getTotalAmountWithTax() {
		return totalAmountWithTax;
	}

	public void setTotalAmountWithTax(BigDecimal totalAmountWithTax) {
		this.totalAmountWithTax = totalAmountWithTax;
	}

	public String getResellerName() {
		return resellerName;
	}

	public void setResellerName(String resellerName) {
		this.resellerName = resellerName;
	}

	public String getResellerTaxNumber() {
		return resellerTaxNumber;
	}

	public void setResellerTaxNumber(String resellerTaxNumber) {
		this.resellerTaxNumber = resellerTaxNumber;
	}

	public String getOrderNumber() {
		return orderNumber;
	}

	public void setOrderNumber(String orderNumber) {
		this.orderNumber = orderNumber;
	}

}
